<?php
/**
 * RedCross Application
 *
 * @copyright Copyright (c) 2010, Kristian Stokke Tryggestad, Rune Vikestad, Andreas Flaten Wist, Simen Nicolai Echholt, Ole Henrik Jahren
 */


class Core_Form_User_Base extends RedCross_Form
{
    public function init()
    {

        $this->addElement('text', 'username', array(
            'filters'       => array('StringTrim'),
            'validators'    => array(
                array('StringLength', true, array(5, 25)),
                array('Username', true),
            ),
            'required'      => true,
            'label'         => 'Brukernavn:'
        ));

        $this->addElement('text', 'email', array(
            'filters'       => array('StringTrim'),
            'validators'    => array(
                array('StringLength', true, array(5, 60)),
                array('EmailAddress', true),
            ),
            'required'      => true,
            'label'         => 'E-mail:'
        ));

        $this->addElement('password', 'password', array(
           'validators'     => array('Password'),
            'required'      => true,
            'label'         => 'Passord:'
        ));
    }
}